import request from '@/utils/request'
// 封装获取部门列表信息的方法 用在department/index.vue中
export const getDepartmentList = () => {
  return request.get('/company/department')
}

export function getMangerLists() {
  return request({
    url: '/sys/user/simple'
  })
}
// 新增子部门
export const addDepartment = (data) => {
  return request.post('/company/department', data)
}

export const getDepartmentDetail = (id) => {
  return request.get(`/company/department/${id}`)
}

export const updateDepartmentDetail = (data) => {
  return request.put(`/company/department/${data.id}`, data)
}
export const delDepartmentDetail = (id) => {
  return request.delete(`/company/department/${id}`)
}

